{include file="public/header" /}



<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.ds_inform}</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>

    <form id="search_form" method="get" name="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>{$Think.lang.ds_goods_name}</dt>
                <dd><input class="txt" type="text" name="input_inform_goods_name" id="input_inform_goods_name" value="{$Request.get.input_inform_goods_name}"></dd>
            </dl>
            <dl>
                <dt>{$Think.lang.inform_type}</dt>
                <dd>
                    <input class="txt" type="text" name="input_inform_type" id="input_inform_type" value="{$Request.get.input_inform_type}"  style=" width:100px;">
                    {$Think.lang.inform_member_name}
                    <input class="txt" type="text" name="input_inform_member_name" id="input_inform_member_name" value="{$Request.get.input_inform_member_name}" style=" width:100px;">
                </dd>
            </dl>
            <dl>
                <dt>{$Think.lang.inform_subject}</dt>
                <dd><input class="txt" type="text" name="input_inform_subject" id="input_inform_subject" value="{$Request.get.input_inform_subject}"></dd>
            </dl>
            <dl>
                <dt>{$Think.lang.inform_datetime}</dt>
                <dd><input id="time_from" class="txt date" type="text" name="input_inform_datetime_start" value="{$Request.get.input_inform_datetime_start}">
                    ~
                    <input id="time_to" class="txt date" type="text" name="input_inform_datetime_end" value="{$Request.get.input_inform_datetime_end}">
                </dd>
            </dl>
            <div class="btn_group">
                <a href="javascript:document.formSearch.submit();" class="btn " title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
                
                <a href="{:url('Inform/inform_list')}" class="btn btn-small" title="{$Think.lang.ds_cancel_search}"><span>{$Think.lang.ds_cancel_search}</span></a>
                
            </div>
        </div>
    </form>

    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
            <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
        </div>
        <ul>
            <li>{$Think.lang.inform_help1}</li>
            <li>{$Think.lang.inform_help2}</li>
        </ul>
    </div>
    
        <table class="ds-default-table">
            <thead>
            <tr>
                <th>{$Think.lang.ds_goods_name}</th>
                <th>{$Think.lang.inform_member_name}</th>
                <th>{$Think.lang.inform_type}</th>
                <th>{$Think.lang.inform_subject}</th>
                <th>{$Think.lang.inform_pic}</th>
                <th>{$Think.lang.inform_datetime}</th>
                <th>{$Think.lang.ds_handle}</th>
            </tr>
            </thead>
            <tbody>
            {notempty name="inform_list"}
            {foreach name="inform_list" item="v"}
            <tr class="line">
                <td><a href="{:url('home/Goods/index',['goods_id'=>$v.inform_goods_id])}" target="_blank">{$v.inform_goods_name}</a></td>
                <td><span>{$v.inform_member_name}</span></td>
                <td><span>{$v.informsubject_type_name}</span></td>
                <td><span>{$v.informsubject_content}</span></td>
                <td>
                    {if empty($v.inform_pic1) && empty($v.inform_pic2) && empty($v.inform_pic3)}
                        {$Think.lang.inform_pic_none}
                    {else/}
                        {notempty name="$v.inform_pic1"}
                        <a href="{:ds_get_pic(ATTACH_PATH.'/inform',$v.inform_pic1)}" target="_blank" data-lightbox="lightbox-image"><img class="show_image" src="{:ds_get_pic(ATTACH_PATH.'/inform',$v.inform_pic1)}" width="50"></a>
                        {/notempty}
                        {notempty name="$v.inform_pic2"}
                        <a href="{:ds_get_pic(ATTACH_PATH.'/inform',$v.inform_pic2)}" target="_blank" data-lightbox="lightbox-image"><img class="show_image" src="{:ds_get_pic(ATTACH_PATH.'/inform',$v.inform_pic2)}" width="50"></a>
                        {/notempty}
                        {notempty name="$v.inform_pic3"}
                        <a href="{:ds_get_pic(ATTACH_PATH.'/inform',$v.inform_pic3)}" target="_blank" data-lightbox="lightbox-image"><img class="show_image" src="{:ds_get_pic(ATTACH_PATH.'/inform',$v.inform_pic3)}" width="50"></a>
                        {/notempty}
                    {/if}
                </td>
                <td><span>{$v.inform_datetime|date="Y-m-d"}</span></td>
                <td>
                    <a href="JavaScript:void(0);" class="dsui-btn-view show_detail"><i class="iconfont"></i>{$Think.lang.ds_detail}</a> 
                    <a href="javascript:dsLayerOpen('{:url('Inform/show_handle_page',['inform_id'=>$v.inform_id,'inform_goods_name'=>$v.inform_goods_name])}','{$Think.lang.inform_text_handle}')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.inform_text_handle}</a>
                </td>
            </tr>
            <tr class="inform_detail">
                <td colspan="15"><div class="shadow2">
                    <div class="content">
                        <dl>
                            <dt>{$Think.lang.inform_content}</dt>
                            <dd>{$v.inform_content}</dd>
                        </dl>
                        <div class="close_detail"><a href="JavaScript:void(0);" title="{$Think.lang.ds_close}">{$Think.lang.ds_close}</a></div>
                    </div>
                </div></td>
            </tr>
            {/foreach}
            {else /}
            <tr class="no_data">
                <td colspan="7">{$Think.lang.ds_no_record}</td>
            </tr>
            {/notempty}
            </tbody>
        </table>
        {notempty name="inform_list"}
        {$show_page|raw}
        {/notempty}

</div>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        //表格移动变色
        $(".inform_detail").hide();
        $(".show_detail").click(function(){
            $(".inform_detail").hide();
            $(this).parents("tr").next(".inform_detail").show();
        });
        $(".close_detail").click(function(){
            $(this).parents(".inform_detail").hide();
        });

        $("tbody .line").hover(
            function()
            {
                $(this).addClass("inform_highlight");
            },
            function()
            {
                $(this).removeClass("inform_highlight");
            });
        $('#time_from').datepicker({dateFormat: 'yy-mm-dd',onSelect:function(dateText,inst){
            var year2 = dateText.split('-') ;
            $('#time_to').datepicker( "option", "minDate", new Date(parseInt(year2[0]),parseInt(year2[1])-1,parseInt(year2[2])) );
        }});
        $('#time_to').datepicker({dateFormat: 'yy-mm-dd',onSelect:function(dateText,inst){
            var year1 = dateText.split('-') ;
            $('#time_from').datepicker( "option", "maxDate", new Date(parseInt(year1[0]),parseInt(year1[1])-1,parseInt(year1[2])) );
        }});
    });
</script>